# -*- coding:UTF-8 -*-
'''
    启动入口
    启动方式:
        [Windows] set ops_config=xxx&& python manage.py runserver
        [Linux & MacOS] export ops_config=xxx&& python manage.py runserver
    ops_config:
        local 本地配置
        production 生产环境配置
        develop 开发环境配置
'''

from application import app,manager
from flask_script import Server
import www

## web server
manager.add_command("runserver", Server(host="127.0.0.1", port=app.config['SERVER_PORT'], use_debugger=True, use_reloader=True))

def main():
    manager.run()

if __name__ == '__main__':
    try:
        import sys
        sys.exit(main())
        pass
    except Exception as e:
        import traceback
        traceback.print_exc()

